package ysq.xyg.model;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * 控制器
 * */
@Table(name = "bohu_relay")
public class Relay implements Serializable {
    @Id
    private int id;
    //设备id
    @Column(name = "relay_id")
    private String relayId;
    //档位1-4
    private String km;
    //手/自动状态  1=自动，0=手动
    private String auto;
    //开/关机：1=开、0=关
    private String power;
    //更新标志,四个按键任何一个按下,把该标志置1
    private String status;
    //操作时间
    private Date time;

    private String type;

    private String km1;

    private String km2;
    /**
     * 设备状态：2、离线和1、在线
     */
    @Transient
    private String deviceType;
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getRelayId() {
        return relayId;
    }

    public void setRelayId(String relayId) {
        this.relayId = relayId;
    }

    public String getKm() {
        return km;
    }

    public void setKm(String km) {
        this.km = km;
    }

    public String getAuto() {
        return auto;
    }

    public void setAuto(String auto) {
        this.auto = auto;
    }



    public String getPower() {
        return power;
    }

    public void setPower(String power) {
        this.power = power;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Relay() {
    }

    public Relay(String relayId) {
        this.relayId = relayId;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public String getKm1() {
        return km1;
    }

    public void setKm1(String km1) {
        this.km1 = km1;
    }

    public String getKm2() {
        return km2;
    }

    public void setKm2(String km2) {
        this.km2 = km2;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}